<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学员选课</title>
<link rel="stylesheet" href="../../easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="../../css/Tooltip.css" />
<script src="../../myjs/student/studentselectcourse.js"></script>
<script src="../../easyui/jquery-1.4.4.min.js"></script>
<script src="../../easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="../../myjs/myTab.js"></script>
<!-- sys -->
<script src="../../myjs/sys.js"></script>
<script src="../../myjs/DatePicker/WdatePicker.js"></script>
<script src="../../easyui/easyMask.js"></script>
<script src="../../easyui/easyUI.js"></script>
<script src="../../easyui/easyLayer.js"></script>

</head>
<script>
var realName='<%=session.getAttribute("realName")%>';
var greyLayer ;
$(function(){
	//学员已选择课程
	selectedcoursegrid = $('#studentselectcourse').datagrid({
		url:'/pxglxt/student/getStudentselectcourses/',
		pagination:true,
		singleSelect:true,
		fit:true,//表格自动填充
		loadMsg:'正在努力为您加载，请稍作等待…',//加载信息
		toolbar:[{
			text:'添加新课程',
			iconCls:'icon-add',
			disabled:true,//按钮失效
			handler:'newStudentselectcourse'
		},'-',{
			text:'取消课程',
			iconCls:'icon-remove',
			disabled:true,//按钮失效
			handler:'delStudentselectcourse'
		}]
	});
	var selectedcoursepagetool = $('#studentselectcourse').datagrid('getPager');
	selectedcoursepagetool.pagination({				
			beforePageText:'第',
			afterPageText:'页，共{pages}页',
			displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});
	//
	
	//选择课程窗口
	grid_selectcourse = $('#tablecourse').datagrid({
		url:'/pxglxt/course/getCourses/',
		pagination:true,
		singleSelect:true,
		fit:true,//表格自动填充
		loadMsg:'正在努力为您加载，请稍作等待…',
		toolbar:[{
			text:'选择课程',
			iconCls:'icon-ok',
			handler:'selectCourse'
		}]
	});
	var selectcoursepagetool = $('#tablecourse').datagrid('getPager');
	selectcoursepagetool.pagination({				
		beforePageText:'第',
		afterPageText:'页，共{pages}页',
		displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});

	win_selectcourse = $('#wincourse').window({
		collapsible:false,
		minimizable:false, 
		maximizable:false, 
		closable:true,
		onClose:function(){greyLayer.close();},
		closed:true
	});
	//
	
	
	$('body').layout();
	$('#btn-search,#btn-reload').linkbutton();
	greyLayer = new easyMask(null,'100%','100%',100,'#000',8,true);
	
});
</script>
<body class="easyui-layout">
<div region="north" split="true" title="简项查询"
	style="height: 180px; padding: 5px;" iconCls="icon-search">
<form method="post">
<table id="searttable" border="1" cellpadding="1" cellspacing="1"
	bordercolor="#E7E7E7" width="100%">
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>姓 名</strong></td>
		<td align="left"><input type="text" name="stu_name" id="stu_name"
			value="" maxlength="100" class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
		<td align="center" bgcolor="#F6F6F6"><strong>性 别</strong></td>
		<td align="left"><input class="easyui-combobox" name="stu_sex"
			id="stu_sex" url="sex.json" valueField="text" textField="text"
			multiple="false" panelHeight="auto" required="false"></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>证件号码</strong></td>
		<td align="left"><input type="text" name="stu_sfzh" id="stu_sfzh"
			value="" maxlength="50" class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>电 话</strong></td>
		<td align="left"><input type="text" name="stu_mobile"
			id="stu_mobile" value="" maxlength="100" class="easyui-validatebox"
			required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
		<td align="center" bgcolor="#F6F6F6"><strong>入学时间</strong></td>
		<td align="left"><input type="text" class="Wdate" size="32"
			name="stu_regist_time" id="stu_regist_time" value="" maxlength="10"
			onClick=WdatePicker();></td>
		<td align="center" bgcolor="#F6F6F6"><strong>学员状态</strong></td>
		<td align="left"><input class="easyui-combobox" name="stu_type"
			id="stu_type" url="/pxglxt/dic_studentstatus/getDicsForComb"
			valueField="dicvalue" textField="dicvalue" multiple="false"
			panelHeight="auto" required="false"></input></td>
	</tr>
</table>
<div style="text-align: center; padding: 20px;"><a
	href="javascript:void(0)" onclick="reloadSearch();"
	id="btn-reload" icon="icon-reload"> 清 空 </a>&nbsp;&nbsp;<a
	href="javascript:void(0)" onclick="returnstudentforchoose();"
	id="btn-search" icon="icon-search"> 查 询 </a></div>
</form>
</div>
<div id="selectedcoursediv" region="center" title="学员已选择课程"
	style="padding: 5px;" iconCls="icon-function">
<table id="studentselectcourse">
	<thead>
		<tr>
			<th field="course_name" width="100%">课程名称</th>
			<th field="coursetype_key" width="100%">课程类别</th>
			<th field="suitgrade_key" width="100%">适合年级</th>
			<th field="tea_id" width="100%">任课教师</th>
			<th field="labour_id" width="100%">班主任</th>
			<th field="classes_key" width="100%">班级类型</th>
			<th field="course_stu_nums" width="100%">预招人数</th>
			<th field="course_stu_counts" width="100%">实际人数</th>
			<th field="course_begin" width="100%">开课时间</th>
			<th field="course_end" width="100%">结束时间</th>
			<th field="course_hours" width="100%">总课时</th>
			<th field="course_times" width="100%">课程节数</th>
			<th field="coursestatus_key" width="100%">课程状态</th>
			<th field="course_tuition" width="100%">学费</th>
			<th field="course_privilege" width="100%">折扣/优惠</th>
			<th field="course_desc" width="100%">课程备注</th>
		</tr>
	</thead>
</table>
</div>
<!--选择课程 begin  -->
<div id="wincourse" title="选择课程" style="width: 700px; height: 500px;">
<table id="tablecourse" name="tablecourse" iconCls="icon-edit" style="width: 650px; height: 450px;"
	singleSelect="true">
	<thead>
		<tr>
			<th field="course_name" width="100%">课程名称</th>
			<th field="coursetype_key" width="100%">课程类别</th>
			<th field="suitgrade_key" width="100%">适合年级</th>
			<th field="tea_id" width="100%">任课教师</th>
			<th field="labour_id" width="100%">班主任</th>
			<th field="classes_key" width="100%">班级类型</th>
			<th field="course_stu_nums" width="100%">预招人数</th>
			<th field="course_stu_counts" width="100%">实际人数</th>
			<th field="course_begin" width="100%">开课时间</th>
			<th field="course_end" width="100%">结束时间</th>
			<th field="course_hours" width="100%">总课时</th>
			<th field="course_times" width="100%">课程节数</th>
			<th field="coursestatus_key" width="100%">课程状态</th>
			<th field="course_tuition" width="100%">学费</th>
			<th field="course_privilege" width="100%">折扣/优惠</th>
			<th field="course_desc" width="100%">课程备注</th>
		</tr>
	</thead>
</table>
</div>
<!--选择课程 end  -->

<!--返回满足条件的学员 begin  -->
<div id="winstudent" iconCls="icon-function" title="满足条件的学员"
	style="width: 800px; height: 375px;">
<table id="tablestudent" iconCls="icon-edit" singleSelect="true"
	idField="id">
	<thead>
		<tr>
			<th field="unit_id" width="100%">校区</th>
			<th field="stu_type" width="100%">学员类型</th>
			<th field="stu_name" width="100%">学员姓名</th>
			<th field="stu_sex" width="100%">性别</th>
			<th field="stu_sfzh" width="100%">身份证号</th>
			<th field="stu_mobile" width="150%">联系方式</th>
			<th field="stu_school" width="100%">就读学校</th>
			<th field="stu_grade" width="100%">就读年级</th>
			<th field="stu_ic_no" width="100%">IC卡号</th>
			<th field="stu_regist_time" width="100%">报名时间</th>
			<th field="stu_desc" width="100%">备注</th>
		</tr>
	</thead>
</table>
</div>
<!--返回满足条件的学员 end  -->
</body>
</html>
